import axios from '@/libs/request/axios'
// 多条件分页获取产品贴息方案
export const getDiscountPlanList = (params) => {
    return axios.request({
        url: '/product/productDiscountPlan/getProductDiscountPlanListData',
        data: params,
        method: 'post'
    })
}
// 贴息方案生效
export const effectiveDiscountPlan = (ids, params) => {
    return axios.request({
        url: `/product/productDiscountPlan/effectiveDiscountPlan/${ids}`,
        data: params,
        method: 'post'
    })
}
// 贴息方案无效
export const invalidDiscountPlan = (ids, params) => {
    return axios.request({
        url: `/product/productDiscountPlan/invalidDiscountPlan/${ids}`,
        data: params,
        method: 'post'
    })
}
// 获取贴息来源
export const getSelectDiscountShare = (params) => {
    return axios.request({
        url: '/product/productDiscountPlan/getSelectDiscountShare',
        data: params,
        method: 'post'
    })
}
// 删除贴息方案
export const deleteById = (id, params) => {
    return axios.request({
        url: `/product/productDiscountPlan/deleteById/${id}`,
        data: params,
        method: 'delete'
    })
}
// 复制贴息方案
export const copyPlan = (params) => {
    return axios.request({
        url: `/product/productDiscountPlan/copyPlan`,
        method: 'POST',
        data: params
    })
}
